/**********************************
 *工具条事件
**********************************/
/**
* 编辑工作组资料
* @return
*/
function edit(typeCode){
  parent.mainFrame.location = "/OrgUI/OrgUI_EditGroup.jsp?groupCode="+typeCode;
}

/**
* 保存方法
*/
function save(){
  mapFrame.mainFrame.submit_me()
}
/**
* 增加工作组
* @return
*/
function add(typeCode){
  mapFrame.mainFrame.location="/OrgUI/OrgUI_EditGroup.jsp?type=add";
}
/**
* 删除工作组
* @return
*/
function del(typeCode){
  if(groupForm.group != null)
 {
  var ls_t = groupForm.all("myTable")
  var group = groupForm.group;
  var submitflag;
  var groupVal="";
  var rowcount = group.length
  if(rowcount==undefined){
     if (group.checked){
          submitflag="y";
          groupVal =groupVal+group.value + "$#$";
     }
  }
  else{
    for (i=0;i<rowcount;i++){
      if (group[i].checked){
          submitflag="y";
          groupVal = groupVal + group[i].value + "$#$";
      }
    }
  }
  if(submitflag == "y"){
   if(confirm("是否确定删除工作组？")){
    groupForm.groupVal.value=groupVal;
    groupForm.action=delAction;
    groupForm.submit();
   }
  }
 }
}

function writeObj(partment)
{
   var outstr="";

  if(currentlyObj!=null)
  {
     for(var i=0;i<currentlyObj.getOrgCount();i++)
     {
       var tmporg=currentlyObj.fndbyIndex(i);
       if(tmporg!=null){
        if(outstr=="")
          outstr=tmporg.getOrgName();
        else
         outstr=outstr+","+tmporg.getOrgName();
       }
     }
  }

  if(partment=="person")
  {
     personName.innerHTML=outstr;
  }
}